import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-forms',
  templateUrl: './forms.component.html',
  styleUrls: ['./forms.component.less']
})
export class FormsComponent implements OnInit {

  constructor() { }

  public userInfo={
    username:'默认名称',
    sex:"1",city:"北京",mark:"",
    hobby:[{title:'吃饭',checked:false},{title:'睡觉',checked:false}]
  };

  public cities:string[]=['北京',"上海"];


  ngOnInit(): void {
  }

  doSubmit():void{
    var dom:any=document.querySelector("#username");
    alert(dom.value);
    console.log(dom.value);
  }

}
